<template>
    <div class="app-container" >
        <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
    </div>
</template>

<script>
export default {
    data() {
        return{};
    },
    created(){
        this.token()
    },
    methods: {
        token(){
            let url = window.location.href
            console.log(url);
            let token = this.$route.params.token
            // console.log(token);
            // alert(token)
            this.$message.success('登录成功')
                 // 存储token到浏览器
            localStorage.setItem('eleToken', token)
                // sessionStorage.setItem('token',res.token)
            this.$router.push({path:'/ucenter2'}); //跳转到主页
        }
    }
}
</script>
